// vim: ft=glsl noet ts=4 sw=4 sts=0
#version 330 core
smooth out vec2 uv[5];
flat   out vec2 scene_size;
layout(location = 0) in vec2 position;
uniform sampler2D scene;

void main()
{
	gl_Position = vec4(position, 0, 1);
	uv[4] = position*0.5 + 0.5;

	scene_size = textureSize(scene, 0);
	uv[0] = uv[4] + vec2(-1, -1) / scene_size;
	uv[1] = uv[4] + vec2(-1, +1) / scene_size;
	uv[2] = uv[4] + vec2(+1, -1) / scene_size;
	uv[3] = uv[4] + vec2(+1, +1) / scene_size;
}

